package tt.com.business.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tt.com.business.service.ServeProvidersSubsidyService;
import tt.com.common.model.ServeProvidersSubsidy;
import tt.com.common.util.PageUtil;

@RestController
@RequestMapping(value = "Preferential/people")
//惠民规则l的前端-后端/api/Preferential/people/xxxx
public class ServeProvidersSubsidyController {

    @Autowired
    private ServeProvidersSubsidyService serveProvidersSubsidyService;

    //查询惠民表
    @PostMapping(value = "select/ServeProvider")
    public ResponseEntity selectServeProvider(@RequestBody PageUtil pageUtil){
        return serveProvidersSubsidyService.selectServeProvider(pageUtil);
    }
    //添加惠民的规则

    @PostMapping(value = "add/ServeProvider")
    public ResponseEntity addServeProvider(@RequestBody ServeProvidersSubsidy serveProvidersSubsidy){
        return serveProvidersSubsidyService.addServeProvider(serveProvidersSubsidy);

    }




}
